﻿using CaptchaGen.NetCore;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Threading.Tasks;

namespace Infrastructure
{
    public class ImageProcessor
    {
        public static async void GenerateVerifyCode(string code, string path)
        {
            using (var fs = File.OpenWrite(path))
            {
                using (var ms = ImageFactory.BuildImage(code, 50, 100, 20, 10, ImageFormatType.Jpeg))
                {
                   ms.WriteTo(fs);
                }
            }
        }
    }
}
